1. Field of the Invention
The present invention relates to an image processing apparatus which performs anti-aliasing on input image data and an image processing method thereof.
2. Description of Related Art
Conventionally, there are cases where stair-like jaggies occur at the boundaries of different colors where the different colors are adjacent to each other resulting in degradation of image quality in images (line drawings) formed by a group of dots and lines, such as characters and marks displayed on a monitor or printed by a printer. Jaggies are prone to occur when granularity of pixels which constitute a line drawing is not sufficient. Therefore, techniques to spuriously improve resolution have been devised. Such techniques are referred to as anti-aliasing or smoothing.
Among such techniques, for example, U.S. Pat. No. 4,437,122 discloses a technique in which resolution of an image is tripled horizontally and vertically and occurrence of jaggy is judged by using conditional judgment in positional relations of ON/OFF of dots in a viewing window of 3×3 pixels including a focused pixel, and the pixel value of the focused pixel which is divided in to 3×3 pixels is changed according to the matched conditions when a plurality of specific conditions prepared in advance are matched.
Moreover, U.S. Pat. No. 4,847,641 discloses a technique to spuriously improve resolution by judging occurrence of jaggy by judging whether the ON/OFF of dots in a viewing window matches a specific pattern referred to as a template and outputting the halftone while the resolution is maintained as it is. However, this technique is difficult because the input pixel is fundamentally constituted of two-bit information of ON/OFF and data processing be complicated when a multi-level image including halftone is applied.
In view of such problem, JP H6-139350 discloses a technique to carry out jaggy detection configured of multi-level data and not the conventional jaggy detection by binary pattern in order to perform smoothing on multi-level image which is to be input. According to this technique, smoothing can be performed on characters and line drawings having halftone values. However, a detection pattern is needed for each tone in order to perform appropriate jaggy detection in this technique. Thus, there is a problem that the circuit size and processing cost increase.
In view of the above problem, JP 2000-156784 discloses a technique to perform smoothing on color halftone characters and halftone line drawings which are printed on a halftone background such as a photograph. Here, after binarizing the multi-level data, occurrence of jaggy is detected by pattern matching and also smoothing is performed only on a region which includes characters and line drawings indicated by attribute signals to obtain a pixel density which becomes the background from neighboring pixels of the jaggy, and an output pixel value is obtained based on the densities of the character and background.
As for binarizing, processing in which edges in an image are detected by using an edge detection operator and intensities of the detected edges are binarized by a certain threshold is described. As for a device for detecting edges, an existing differential operator such as Sobel or Laplacian is used. Then, pixels having edge intensity exceeding the threshold are judged as edge pixels, and binarizing is carried out by converting the pixel values of the edge pixels to 255 and the pixel values of non-edge pixels to 0. Thereafter, pattern matching by using template data is carried out to the binarized edge information.